1. Field of the Invention
The present invention relates to a method for transceiving special data when data are communicated in use of serial communication interfaces, in particular to a method for transceiving special data in digital communication for vehicle, the method will be integrant technology of a future network among vehicles (IN-VEHICLE NETWORK).
2. Description of Background Art
So-called IN-VEHICLE NETWORK is a technology of linking through a network so that pieces of information in electrical components are mutually shared and the wiring in a vehicle is simplified. Exchange of information in the network is based on a digital communication method standardized for communication among vehicles. There are many cases where a digital communication method different from a general-purpose digital communication is applied and special signals and a special transceiving means are required because it is used for data communication for vehicle requiring improvement on reliability and efficiency of information exchange.
As one of digital communication standards for vehicle, Local Interconnect Network (LIN) is exemplified.
FIGS. 10A and 10B illustrate a network structure and a concept of transmission in LIN. In FIGS. 10A and 10B, data are transmitted from a master control unit to a slave control unit by a slave task in the master control unit, and the data are transmitted among slave control units by a message ID. Further, a message frame includes a synchronization field (synch field), an identifier field, a data field of 2, 4 or 8 bits, and a check field. A detailed specification of LIN is described in LIN Protocol Specification Revision 1.2.
Next, a data communication using a serial communication interface will be described. FIG. 11 illustrates a structure of one of nodes provided for data communication of IN-VEHICLE NETWORK. In FIG. 11, electrical control unit (ECU) 2 is equipped in one of electrical components 1 of vehicle, and ECU 2 includes serial communication interface (SCI) 10, and microcomputer unit (MCU) 20.
ECU 2 forms one of nodes in the IN-VEHICLE NETWORK and transceives information with other nodes by serial communication through a communication wire 30, wherein the electric potential of the communication wire 30 is changed between HIGH and LOW.
Details of transceiving the data through the serial communication interface 10 will be described in view of FIG. 11.
(1) A case where the electric potential of the communication wire is operated by a node on the others' side based on communication information, i.e. a node on the own side receives.
When the potential is HIGH, transistor T1 is turned on and transistor T2 is turned on, whereby receive port Rx of MCU20 becomes HIGH.
When the potential is LOW, transistor T1 is turned off, and transistor T2 is turned off, whereby receive port Rx of MCU20 becomes LOW.
As such, receive port Rx checks the level of HIGH or LOW of the communication wire electric potential effected by the node on the others' side.
(2) A case where the electric potential of the communication wire is operated by the node on the own side based on communication information, in other words the node on the own side receives.
When the potential is changed to HIGH, transmission port Tx is changed to HIGH. Then, transistor T4 is turned off, transistor T3 is turned off, whereby communication wire 30 becomes HIGH.
When the electric potential is changed to LOW, transmission port Tx is changed to LOW. Then transistor T4 is turned on, and transistor T3 is turned on, whereby the electric potential of the communication wire becomes LOW.
Receive port Rx of MCU20 stores continuous data of HIGH and LOW through the communication wire into a storage, e.g. resistor, provided in advance, automatically as data of 0 and 1. As illustrated in FIG. 12 in a case of Universal Asynchronous Receiver/Transmitter (hereinbelow referred to as UART), single character S2 including start bit b1, stop bit b2 and data bit b3, interposed between start bit b1 and stop bit b2, is ordinarily recognized as one unit of the communication data, and data bit b3 is ordinarily stored as received information.
Meanwhile, transmission port Tx of MCU20 automatically controls the electric potential of communication wire 30 by automatically recognizing the continuous data of HIGH or LOW in the communication wire as the data of 0 or 1 based on data prepared in the storage in advance. In UART, single character S2 is ordinarily operated as a unit of the communication data.
Conventional Technique 1
When UART is carried out based on a predetermined transmission rate using a serial communication interface, there is a case where special data including communication wire continuous dominant levels of a number of N bits more than the ordinary number of n bits of communication wire continuous dominant levels, limited by the number of transceiving bits set within a single character, i.e. a unit of communication data. Hereinbelow, a communication wire level in an initial state where a power source is thrown in the communication wire and no control is done is referred to as a communication wire recessive level, and a communication wire level in a state that the control is done is referred to as a communication wire dominant level.
For example, as illustrated in FIG. 12, a case where a single character is composed of start bit b1 of one bit, stop bit b2 of one bit, and data bit b3 of eight bits, and LOW data composed of continuous 13 bits like SYNCH BRAKE SIGNAL for informing initiation of message frame in LIN, are sent out, will be described. In this case, it is necessary to provide hardwares and a software to be described below.
As illustrated in FIG. 13, the hardware of I/O terminal 40 is added to MCU20 and the hardware of breaking circuit 50 is added between I/O terminal 40 and communication wire 30.
The software is a control program for I/O terminal 40 added to MCU20. FIG. 14 exemplifies a case where four characters are sent, in other words, a flow chart for transmitting the whole characters including special data of communication wire continuous dominant levels having a first character longer than in the standard.
The data communication according to CONVENTIONAL TECHNIQUE 1 will be described in reference of FIG. 15. At point A, the potential of communication wire 30 is set to be LOW in use of I/O port 40 specially provided in MCU20 and special breaking circuit 50 which is not inherently provided in SCI circuit 10. Next, in time period B, the state of LOW in communication wire 30 is maintained for a time duration realizing “communication frame start signal S1” by measuring a time by a timer in MCU20. “Communication frame start signal S1” is for example a signal of LOW data composed of continuous 13 bits such as SYNCH BRAKE signal in LIN. Next, at point C, the control of communication wire 30 to be LOW is released after a lapse of the time duration realizing “communication frame start signal S1”.
Conventional Technique 2
In a case where UART is carried out based on a transmission rate determined using a serial communication interface, there are cases where an intercharacter time is specifically required by a receiving side because of its performance and where a message standard requires an intercharacter time between characters. An example of the case where the message standard requires the intercharacter time is RESPONSE SPACE SIGNAL in LIN illustrated in FIGS. 10A and 10B.
In this case, it is necessary to add a program for setting the intercharacter time between transmissions of character as illustrated in FIG. 16.
Data communication according to CONVENTIONAL TECHNIQUE 2 will be described in reference of FIG. 15.
At point C, the time duration realizing “communication frame start signal S1” is completed, the control of communication wire 30 to be LOW is released, and a measurement of intercharacter time S3 is started.
Next, at time period D, because a character is not immediately transmitted in UART, intercharacter time S3, i.e. a time duration corresponding to one bit in FIG. 15, is measured by a timer function of MCU20.
Next, at point E, after intercharacter time S3 passes over, character data S2 byte-corded for asynchronous method are sent. In this example, character data S2 is transmitted to MCU20 in a setting of a normal transmission rate, the start bit of 1 bit, the data bit of 8 bits, and the stop bit of 1 bit.
Next, at point F, after the character is completely transmitted, a measurement of intercharacter time S3 is started without transmitting a next character. The next character data is on standby.
Next, in time period G, intercharacter time S3 corresponding to a time of 1 bit is measured by the timer function of MCU20.
Next, at point H, after it is checked that intercharacter time S3 is completely measured, character data S2 byte-coded by an asynchronous method is transmitted.
Next, at point I, after the final character data is completely transmitted, a measurement of intercharacter time S3 is started without giving a sign for starting a next communication frame.
Next, in time period J, intercharacter time S3 corresponding to a time of one bit is measured by the timer function of MCU20.
At point K, after it is checked that intercharacter time S3 is completely measured, the process is completed in a state that the next communication frame is ready to be transmitted.
Conventional Technique 3
A case where data specially bit-coded by using a pulse width modulation (PWM) signal is communicated through the above-mentioned serial communication interface will be described.
FIG. 17 explains the PWM bit coding. In the PWM bit coding, for example, “IDLE”, logic “0”, and logic “1” are respectively expressed by the lengths Li, L0 and L1 of LOW time duration in one cycle T of PWM pulses.
FIG. 18 illustrates a conventional hardware structure for communicating the data bit-coded using the PWM signal through the serial communication interface. In FIG. 18, numerical reference SUBMCU60 designates an auxiliary microcomputer unit for communicating the PWM bit-coded data. In SUBMCU60, a program for communicating the data is installed. I/O (1) port in SUBMCU60 is provided so that the time duration of the potential of LOW in the communication wire is monitored, measured, and inputted. I/O (2) port in SUBMCU60 is provided so that the time duration of the potential of LOW in the communication wire is monitored, measured, and outputted to make the potential to be LOW. Rx port and Tx port in SUBMCU60 are respectively connected to Rx port and Tx port in MAINMCU20 so that data is communicated in serial between SUBMCU60 and MAINMCU20. Further, oscillator 61 for driving SUBMCU and power supply wire 62 for supplying power to SUBMCU are connected to SUBMCU60.
A method for communicating the specially bit-coded data using the PWM signal by the hardware illustrated in FIG. 18 will be described.
A case where the hardware in FIG. 18 is used as a node on the sending side will be described at first.
(1) Sending an Idle Pulse
I/O (2) port as a switch for operating the circuit making the potential of the communication wire LOW is switched on to be in an output state. Simultaneously, the time duration of one cycle of pulse is started to be measured. After a lapse of the time rate of LOW in one cycle of pulse realizing IDLE pulse, the I/O port is switched off to be in a non-output state. After a lapse of one cycle of pulse, a single IDLE pulse is completely transmitted and the following pulse generation control flow will be performed.
(2) Sending a Pulse Meaning Logic “0”
I/O (2) port as a switch for operating a circuit for making the communication wire potential LOW is switched on to be in an output state. Simultaneously, the time duration of one period of pulse is started to be measured. After a lapse of the time rate of LOW in one cycle of pulse realizing logic “0”, the I/O port is switched off to be in a non-output state. After a lapse of one cycle of pulse, a single bit pulse is completely transmitted and the following pulse generation control flow will be performed.
(3) SENDING A PULSE MEANING LOGIC “1”
I/O (2) port as a switch for operating a circuit for making the communication wire potential LOW is switched on to be in an output state. Simultaneously, the time rate of one cycle of pulse is started to be measured.
After a lapse of the time rate of LOW in one cycle of pulse meaning logic “1”, the I/O port is switched off to be in a non-output state. After a lapse of one cycle of pulse, a single bit pulse is completely transmitted and the following pulse generation control flow will be performed.
Next, a case where the hardware in FIG. 18 is used as a node on the receiving side will be described.
(1) Detecting an event that the communication wire potential is transferred from HIGH to LOW, and simultaneously it is started to measure the time duration;
(2) Detecting an event that the communication wire potential is transferred from LOW to HIGH, and simultaneously the measured time duration is checked. The measured time duration is stored in a memory as the time duration of LOW in one pulse;
(3) Detecting an event that the communication wire potential is transferred from HIGH to LOW, and simultaneously the measured time duration is checked, and the measurement is initialized by resetting. The measured time duration is stored in a memory as the cycle of one pulse, and simultaneously the above (1) is performed;
(4) The time rate of LOW in one in the cycle of pulse is calculated from the stored data. Based on the result, the measured pulses are classified by their meaning among “IDLE”, “0”, and “1”, and the measured pulses are sequentially stored in a storage as data.
According to the CONVENTIONAL TECHNIQUE 1, it is necessary to specially add breaking circuit 50 in addition to SCI circuit 10, whereby an additional cost for components of the breaking circuit, a cost for mounting the components, and an area for the added circuit on a unit board are caused, and there is a case where a unit is large-sized.
Further, it is necessary to add I/O terminal 40 to MCU20, and if MCU20 does not have any unused I/O terminal, it is necessary to upgrade the number of I/O terminals in MCU. This upgrading means an increment of cost, and there is a case where a type of MCU is replaced to radically change a software and a hardware and to increase the size.
Further, by adding the I/O terminal control program for monitoring using the timer by MCU20, it is necessary to upgrade MCU when the memory capacity for program in MCU20 is not left. Further, when the turnover rate of the total program exceeds 100%, i.e. overflowing, by the additional program, it is necessary to upgrade the clock speed of MCU or MCU itself.
In other words, the above-mentioned problems of the CONVENTIONAL TECHNIQUE 1 are disadvantageous in terms of the cost and the size which are making these products nifty.
According to the CONVENTIONAL TECHNIQUE 2, it is necessary to introduce a complicated program for measuring the duration of intercharacter time and making character data to be succeedingly sent on standby. When a program memory area is not left in MCU, it is necessary to upgrade MCU.
Further, when the turnover rate of the total program exceeds 100%, i.e. overflowing, by the added program, it is necessary to upgrade the clock speed of MCU or MCU itself. These upgrading make the cost of product high.
According to CONVENTIONAL TECHNIQUE 3, it is necessary to add SUBMCU exclusively used for communication or a special IC exclusively used for communication must be added, and also wiring for supplying electric power and an oscillator for driving these must be added. It is also necessary to add a new program for SUBMCU, and a new program is necessary for communication between MAINMCU and SUBMCU. Therefore, the cost and the size of the product are drastically increased.